$(document).ready(function() {
	// Autocheck pre formulare class="autocheck" na polia class="required"
    $('form.autocheck').each(function () {
    	$(this).submit(function(){
    		var required = $.makeArray($(this).find('input.required'));
    		var i;
    		for(i = 0; i<required.length; i++)
    		{
    			if(required[i].value == '')
    			{
    				alert(L.emptyRequiredField);
    				required[i].focus();
    				return false;
    			}
    		}
    		return true;
    	});
    });
});
